* @ingroup FileBackend
*/
+use Wikimedia\AtEase\AtEase;
+
/**
* Simulation of a backend storage in memory.
*
return $status;
}
- Wikimedia\suppressWarnings();
+ AtEase::suppressWarnings();
$data = file_get_contents( $params['src'] );
- Wikimedia\restoreWarnings();
+ AtEase::restoreWarnings();
if ( $data === false ) { // source doesn't exist?
$status->fatal( 'backend-fail-store', $params['src'], $params['dst'] );
} else {
// Create a new temporary file with the same extension...
$ext = FileBackend::extensionFromPath( $src );
- $fsFile = TempFSFile::factory( 'localcopy_', $ext, $this->tmpDirectory );
+ $fsFile = $this->tmpFileFactory->newTempFSFile( 'localcopy_', $ext );
if ( $fsFile ) {
$bytes = file_put_contents( $fsFile->getPath(), $this->files[$src]['data'] );
if ( $bytes !== strlen( $this->files[$src]['data'] ) ) {